package plus.chendd.lock;

import java.util.concurrent.TimeUnit;

public class EndThread001 {
  public static void main(String[] args) throws InterruptedException {
    Thread t1 = new Thread(() -> {
      try {
        TimeUnit.SECONDS.sleep(5);
      } catch (InterruptedException e) {
        throw new RuntimeException(e);
      }
    });
    t1.start();
    
    TimeUnit.SECONDS.sleep(1);
    
    // 通过 stop 方法 强制打断
    t1.stop();
  }
}
